#!/boot/home/config/bin/perl -w

# This script will convert the selected HTML text
# to the plain text with Perl.
# If there's no selection, nothing will be done.

open TMP, "$ENV{'TMPFILE'}";
while(<TMP>){
	s/<BR>\n/\n/g;
	s/<[^<]*>//g;
	s/&amp;/&/g;
	s/&lt;/</g;
	s/&gt;/>/g;
	s/&quot;/\"/g;
	s/&nbsp;&nbsp;&nbsp;&nbsp;/\t/g;
		
	print;
}
close TMP;